@import "~style";

.@{prefix}-entity {
  height: 100%;
  /*&-title {
    height: 21px;
  }*/
  .@{prefix}-check-rule-edit {
    height: 100%;
    margin: 0;
    width: 100%;
  }
  .@{prefix}-check-rule-detail {
    height: 100%;
  }
  &-content {
    height: 100%;
  }
  &-base {
    width: 100%;
    height: 100%;
    padding: 10px 5px;
    &-search {
      .@{prefix}-search-input {
        padding: 0 4px;
        input {
          height: 18px;
          line-height: 18px;
        }
      }
    }
    &-form {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      & > fieldset {
        height: 100%;
      }
    }
    &-fieldset {
      display: flex;
      flex-direction: row;
      & > div {
        width: 100%;
        padding: 0;
        margin-bottom: 8px;
        & > span:first-child {
          background-color: @third-primary-color;
          color: @primary-color;
          margin: 0;
          padding: 2px 5px;
          border-radius: 5px 0 0 5px;
        }
        & > span:last-child {
          margin-left: 0;
          input {
            border-radius: 0 5px 5px 0;
          }
        }
      }
    }
    &-other-fieldset {
      display: flex;
      flex-direction: column;
      &-group {
        display: flex;
        flex-direction: row;
        & > div {
          width: 50%;
        }
      }
    }
    &-properties {
      border: dashed 1px @primary-border-color;
      //max-height: 100px;
      height: 100%;
      &-field {
        padding: 5px;
        height: calc(100% - 5px);
        & > div:last-child {
          height: calc(100% - 30px);
          overflow: auto;
        }
      }
      &-list {
        margin: 2px 0;
        cursor: pointer;
        &-container {
          height: 100%;
          & > table {
            text-align: left;
            border-collapse: separate;
            border-spacing: 0;
            width: 100%;
            input {
              width: 100%;
            }
            tbody {
              tr {
                &:hover {
                  td {
                    background: @fourth-primary-color !important;
                    input, select {
                      background: transparent;
                    }
                  }
                }
              }
            }
            th:first-of-type, td:first-of-type {
              border-left: 1px solid @primary-border-color;
            }
            th {
              border-top: 1px solid @primary-border-color;
            }
             td, th {
               background: @background-color;
               border-right: 1px solid @primary-border-color;
               border-bottom: 1px solid @primary-border-color;
             }
            td {
              padding: 2px;
              text-align: left;
            }
            th {
              z-index: 2;
              padding: 2px;
              text-align: left;
              background: @background-color;
              position: sticky;
              top: 0;
            }
          }
          //overflow: auto;
        }
        &-border {
          background: @primary-border-color;
          height: 1px;
        }
        //padding: 5px 5px;
        display: flex;
        flex-direction: row;
        //justify-content: space-around;
        align-items: center;
        span:first-of-type {
          user-select: none;
          padding: 0 10px;
          text-align: center;
          width: 100px;
        }
        &-opt {
          position: sticky;
          top: 0;
          background: @background-color;
          margin-bottom: 3px;
          border-bottom: 1px solid @primary-border-color;
          & > span:first-child {
            i {
              padding: 5px;
              color: @primary-color;
            }
          }
          & > span:nth-child(2) {
            i {
              color: @danger-color;
            }
          }
          & > span + span {
            position: relative;
            &:before {
              position: absolute;
              content: " ";
              width: 1px;
              height: 60%;
              top: 20%;
              left: 0;
              background-color: @primary-border-color;
            }
          }
        }
        &-selected {
          & > td {
            background: @third-primary-color !important;
            color: @primary-color;
          }
        }
        &-item {
          span:first-of-type {
            background: inherit;
            color: inherit;
            padding: 0;
          }
          display: flex;
          flex-direction: row;
          align-items: center;
          border-left: 1px solid @primary-border-color;
          padding-left: 10px;
          span + span {
            margin-left: 10px;
          }
        }
      }
      &-edit {
        margin-left: 5px;
        cursor: pointer;
        color: @primary-color;
      }
    }
  }
  &-code {
    height: 100%;
    background: @background-color;
    padding: 5px;
  }
  &-indexes {
    background: @background-color;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    &-children-table {
      background-color: @background-color;
      & > span:first-child {
        text-align: left;
      }
      margin: 5px;
      width: auto;
      padding: 5px;
      table {
        tbody {
          & > tr:first-child {
            td {
              border-top: 1px solid @primary-border-color;
            }
          }
          tr:nth-child(2n) {
            td {
             // background: @tr-background;
            }
          }
        }
      }
    }
    table {
      thead {
        th {
          //background: @third-primary-color;
          //color: @primary-color;
        }
      }
      width: 100%;
      //border: none;
      td, th {
        i {
          display: inline-block;
        }
        //border: none;
      }
    }
    &-left {
      width: 80%;
    }
    &-right {
      &-import {
        height: 60vh;
        overflow: auto;
      }
    }
  }
  &-fields-right {
    &-import {
      max-height: 60vh;
      overflow: auto;
    }
  }
  &-template {
    &-customer-title {
      min-width: 110px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      & > div {
        width: 100%;
        & > span {
          width: 100%;
        }
      }
      & > div:last-child {
        margin-top: 5px;
      }
    }
    &-footer {
      position: absolute;
      bottom: 5px;
      background: @background-color;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      & > span {
        display: inline-block;
        width: 100%;
        & > span {
          width: 100%;
        }
      }
      & > span:first-child {
        margin-bottom: 5px;
      }
    }
    &-opt {
      color: @primary-color;
      margin-left: 50px;
      cursor: pointer;
    }
    &-title {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
    }
    &-component {
      input {
        width: auto !important;
      }
    }
    &-pickdir {
      max-height: 70vh;
      margin-bottom: 10px;
      &-search {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
      }
      &-container {
        overflow: auto;
        height: calc(70vh - 30px);
      }
      &-selected {
        background: @second-primary-color;
        color: @background-color;
        & > td {
          padding: 2px;
        }
      }
      table {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
        & > tbody > tr {
          &:hover {
            cursor: pointer;
          }
        }
      }
      table > thead {
        & > tr > td {
          border-bottom: 1px dashed @primary-border-color;
          text-align: left;
          position: sticky;
          top: 0;
          background: @background-color;
        }
      }
    }
    &-container {
      max-height: calc(35vh - 50px);
      overflow: auto;
      &-item {
        &-suffix {
          display: flex;
          flex-direction: row;
          & > span:last-child {
            flex-grow: 1;
            margin-left: 20px;
          }
        }
      }
      & > div {
        &:first-child {
          z-index: 2;
          background: @background-color;
          position: sticky;
          top: 0;
          text-align: center;
          border-bottom: 1px dashed @primary-border-color;
          margin-bottom: 5px;
        }
        padding: 2px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        & > div + div {
          margin-left: 3px;
        }
        & > div {
          &:first-child {
            width: 20%;
            text-align: left;
          }
          input {
            width: 100%;
          }
          width: 70%;
        }
      }
    }
  }
  &-env {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    &-container {
      height: 100px;
      overflow: auto;
      & > div {
        margin-bottom: 10px;
        i {
          cursor: pointer;
        }
      }
      & > div:last-child {
        cursor: pointer;
        margin: 0 72px 20px 72px;
        padding: 5px;
        border: 1px solid @primary-border-color;
        border-radius: 5px;
        text-align: center;
      }
    }
  }
}
